Optimal. Leaf size=103 \[ -\frac {d^2 \sqrt {d^2-e^2 x^2}}{e^3}-\frac {d x \sqrt {d^2-e^2 x^2}}{2 e^2}+\frac {\left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}+\frac {d^3 \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{2 e^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {811, 655, 201,
223, 209} \begin {gather*} \frac {d^3 \text {ArcTan}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{2 e^3}-\frac {d x \sqrt {d^2-e^2 x^2}}{2 e^2}-\frac {d^2 \sqrt {d^2-e^2 x^2}}{e^3}+\frac {\left (d^2-e^2 x^2\right )^{3/2}}{3 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 201
Rule 209
Rule 223
Rule 655
Rule 811
Rubi steps
\begin {align*} \int \frac {x^2 (d+e x)}{\sqrt {d^2-e^2 x^2}} \, dx &=-\frac {\int (d+e x) \sqrt {d^2-e^2 x^2} \, dx}{e^2}+\frac {d^2 \int \frac {d+e x}{\sqrt {d^2-e^2 x^2}} \, dx}{e^2}\\ &=-\frac {d^2 \sqrt {d^2-e^2 x^2}}{e^3}+\frac {\left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}-\frac {d \int \sqrt {d^2-e^2 x^2} \, dx}{e^2}+\frac {d^3 \int \frac {1}{\sqrt {d^2-e^2 x^2}} \, dx}{e^2}\\ &=-\frac {d^2 \sqrt {d^2-e^2 x^2}}{e^3}-\frac {d x \sqrt {d^2-e^2 x^2}}{2 e^2}+\frac {\left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}-\frac {d^3 \int \frac {1}{\sqrt {d^2-e^2 x^2}} \, dx}{2 e^2}+\frac {d^3 \text {Subst}\left (\int \frac {1}{1+e^2 x^2} \, dx,x,\frac {x}{\sqrt {d^2-e^2 x^2}}\right )}{e^2}\\ &=-\frac {d^2 \sqrt {d^2-e^2 x^2}}{e^3}-\frac {d x \sqrt {d^2-e^2 x^2}}{2 e^2}+\frac {\left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}+\frac {d^3 \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{e^3}-\frac {d^3 \text {Subst}\left (\int \frac {1}{1+e^2 x^2} \, dx,x,\frac {x}{\sqrt {d^2-e^2 x^2}}\right )}{2 e^2}\\ &=-\frac {d^2 \sqrt {d^2-e^2 x^2}}{e^3}-\frac {d x \sqrt {d^2-e^2 x^2}}{2 e^2}+\frac {\left (d^2-e^2 x^2\right )^{3/2}}{3 e^3}+\frac {d^3 \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{2 e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 92, normalized size = 0.89 \begin {gather*} \frac {\left (-4 d^2-3 d e x-2 e^2 x^2\right ) \sqrt {d^2-e^2 x^2}}{6 e^3}+\frac {d^3 \sqrt {-e^2} \log \left (-\sqrt {-e^2} x+\sqrt {d^2-e^2 x^2}\right )}{2 e^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 107, normalized size = 1.04
method | result | size |
risch | \(-\frac {\left (2 e^{2} x^{2}+3 d e x +4 d^{2}\right ) \sqrt {-e^{2} x^{2}+d^{2}}}{6 e^{3}}+\frac {d^{3} \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right )}{2 e^{2} \sqrt {e^{2}}}\) | \(75\) |
default | \(e \left (-\frac {x^{2} \sqrt {-e^{2} x^{2}+d^{2}}}{3 e^{2}}-\frac {2 d^{2} \sqrt {-e^{2} x^{2}+d^{2}}}{3 e^{4}}\right )+d \left (-\frac {x \sqrt {-e^{2} x^{2}+d^{2}}}{2 e^{2}}+\frac {d^{2} \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right )}{2 e^{2} \sqrt {e^{2}}}\right )\) | \(107\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 75, normalized size = 0.73 \begin {gather*} \frac {1}{2} \, d^{3} \arcsin \left (\frac {x e}{d}\right ) e^{\left (-3\right )} - \frac {1}{3} \, \sqrt {-x^{2} e^{2} + d^{2}} x^{2} e^{\left (-1\right )} - \frac {1}{2} \, \sqrt {-x^{2} e^{2} + d^{2}} d x e^{\left (-2\right )} - \frac {2}{3} \, \sqrt {-x^{2} e^{2} + d^{2}} d^{2} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.35, size = 68, normalized size = 0.66 \begin {gather*} -\frac {1}{6} \, {\left (6 \, d^{3} \arctan \left (-\frac {{\left (d - \sqrt {-x^{2} e^{2} + d^{2}}\right )} e^{\left (-1\right )}}{x}\right ) + {\left (2 \, x^{2} e^{2} + 3 \, d x e + 4 \, d^{2}\right )} \sqrt {-x^{2} e^{2} + d^{2}}\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 2.11, size = 177, normalized size = 1.72 \begin {gather*} d \left (\begin {cases} - \frac {i d^{2} \operatorname {acosh}{\left (\frac {e x}{d} \right )}}{2 e^{3}} + \frac {i d x}{2 e^{2} \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} - \frac {i x^{3}}{2 d \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} & \text {for}\: \left |{\frac {e^{2} x^{2}}{d^{2}}}\right | > 1 \\\frac {d^{2} \operatorname {asin}{\left (\frac {e x}{d} \right )}}{2 e^{3}} - \frac {d x \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}}{2 e^{2}} & \text {otherwise} \end {cases}\right ) + e \left (\begin {cases} - \frac {2 d^{2} \sqrt {d^{2} - e^{2} x^{2}}}{3 e^{4}} - \frac {x^{2} \sqrt {d^{2} - e^{2} x^{2}}}{3 e^{2}} & \text {for}\: e \neq 0 \\\frac {x^{4}}{4 \sqrt {d^{2}}} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.28, size = 54, normalized size = 0.52 \begin {gather*} \frac {1}{2} \, d^{3} \arcsin \left (\frac {x e}{d}\right ) e^{\left (-3\right )} \mathrm {sgn}\left (d\right ) - \frac {1}{6} \, \sqrt {-x^{2} e^{2} + d^{2}} {\left (4 \, d^{2} e^{\left (-3\right )} + {\left (2 \, x e^{\left (-1\right )} + 3 \, d e^{\left (-2\right )}\right )} x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.14, size = 112, normalized size = 1.09 \begin {gather*} \left \{\begin {array}{cl} \frac {d\,x^3}{3\,\sqrt {d^2}} & \text {\ if\ \ }e=0\\ -\frac {\sqrt {d^2-e^2\,x^2}\,\left (2\,d^2+e^2\,x^2\right )}{3\,e^3}-\frac {d^3\,\ln \left (2\,x\,\sqrt {-e^2}+2\,\sqrt {d^2-e^2\,x^2}\right )}{2\,{\left (-e^2\right )}^{3/2}}-\frac {d\,x\,\sqrt {d^2-e^2\,x^2}}{2\,e^2} & \text {\ if\ \ }e\neq 0 \end {array}\right . \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________